package com.yaowk.service.mall.clothing.entity;

import com.yaowk.service.system.entity.SysUser;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 * 量体师
 */
@Getter
@Setter
@ToString
@Entity
@DynamicUpdate
@DynamicInsert
public class CmSurveyor extends SysUser {

    @Column(unique = true, nullable = false)
    private String code; // 编号
    private String account; // 注册账号
    private String realName; // 姓名
    private String phoneNumber; // 电话号码
    private String headUrl; // 头像
    private Byte sex; // 性别
    @Column(insertable = false, updatable = false)
    private Integer commissionId;
    @Column(insertable = false, updatable = false)
    private Integer parentId; // 上级id

    @ManyToOne
    @JoinColumn(name = "commissionId")
    private CmCommission commission; // 佣金


}
